import os
import tkinter as tk
import subprocess
AppWindow = tk.Tk()
AppWindow.title("加密大亨模拟游戏1中英文版")
screenwidth = AppWindow.winfo_screenwidth()
screenheight = AppWindow.winfo_screenheight()
width = 400
height = 200
AppWindow.geometry("%dx%d+%d+%d" % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2))
AppWindow.resizable(False, False)

def language1():
    AppWindow.destroy()
    subprocess.Popen(["python","chinese\\ChineseVersionMain.py"],shell=True)

def language2():
    AppWindow.destroy()
    subprocess.Popen(["python","English\\EnglishVersionMain.py"],shell=True)

def create_widget():
    global AppWindow
    label1 = tk.Label(AppWindow, text="加密大亨模拟游戏1\nCryptoTycoonSimGame1",font=("Arial",18))
    label1.pack()
    label2 = tk.Label(AppWindow, text="请选择语言：")
    label2.pack()
    frame = tk.Frame(AppWindow)
    frame.pack()
    languagebutton1 = tk.Button(frame,text="中文",font=("Arial",18),width=10,command=language1)
    languagebutton2=tk.Button(frame,text="English",font=("Arial",18),width=10,command=language2)
    languagebutton1.grid(row=0,column=0)
    languagebutton2.grid(row=0,column=1)

create_widget()
AppWindow.mainloop()
